﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cms.Core.Infrastructure.Common
{
    /// <summary>
    /// Ajax结果类型
    /// </summary>
    public enum AjaxResultType
    {
        /// <summary>
        /// 消息结果
        /// </summary>
        [Display("消息结果")]
       
        Info = 203,

        /// <summary>
        /// 成功
        /// </summary>
        [Display("成功")]
        Success = 200,

        /// <summary>
        /// 错误
        /// </summary>
        [Display("错误")]
        Error = 500

    }


    /// <summary>
    /// 操作结果类型
    /// </summary>

    public enum OperationResultType
    {
        /// <summary>
        ///   操作成功
        /// </summary>
        [Display("操作成功。")]
        Success = 0,

        /// <summary>
        ///   操作引发错误
        /// </summary>
        [Display("操作引发错误。")]
        Error = 5,

        /// <summary>
        ///   系统出现异常
        /// </summary>
        [Display("系统出现异常。")]
        Exp = 10,

        /// <summary>
        ///   指定参数的数据不存在
        /// </summary>
        [Display("数据源不存在。")]
        QueryNull = 15,


        /// <summary>
        ///   操作取消或操作没引发任何变化
        /// </summary>
        [Display("操作没有引发任何变化。")]
        NoChanged = 20,
    }


    public enum UserState {
        [Display("启用")]
        Enable = 0,
        [Display("禁用")]
        Disable = 1,
    }

    public enum Enabled
    {
        [Display("否")]
        Disable = 0,
        [Display("是")]
        Enable = 1,
    }

    [Display("菜单类型")]
    public enum PermissionType : byte
    {
        [Display("菜单")]
        Menu = 0,
        [Display("按钮")]
        Button = 5,
        [Display("列表")]
        List=10,
  
        [Display("方法")]
        Action = 15,
        [Display("内部页面")]
        IntemalPage = 20
    }

    public enum SortDirection
    {

        Ascending = 0,
        
        Descending = 1
    }
    /// <summary>
    /// 
    /// </summary>
    public enum AuthorizationCode
    {
        [Display("权限检查通过")]
        Ok = 200,

        [Display("未经授权")]
        Unauthorized = 1000,

        [Display("Token已过期")]
        TokenExpired = 1005,

        [Display("未登录")]
        UnLogin = 1010,

        [Display("未凭据")]
        UnEvidence = 1015,

        [Display("刷新Token")]
        RefreshToken = 1020,
    }
}
